<?php
    $time = microtime();
    $time = explode(' ', $time);
    $time = $time[1] + $time[0];
    $start = $time;
?>
<?php
    include('library/core.php');
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>The gioi rao vat</title>
        <?php core::getHeader(); ?>
        <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/newlayout.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/theme.php'.(core::$controller->sController == 'category' ? '?category='.core::$controller->sId : '')); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/main.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('css/ui-lightness/jquery-ui-1.9.2.custom.css'); ?>">

        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/header-style.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/style.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/admin/style.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/custom.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/entity.css'); ?>">

        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/upload/jquery.fileupload.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/slider/bjqs.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/carousel/custom.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo URL::getLink('style/carousel/elastislide.css'); ?>">

        <script type="text/javascript" src="<?php echo URL::getLink('script/jquery-2.0.2.min.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/jquery-ui-1.9.2.custom.min.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/jquery.mousewheel.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/masonry.pkgd.min.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/script.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/scriptuser.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/scriptprocess.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/scriptadmin.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/jquery-custom-combobox.js'); ?>"></script>

        <script type="text/javascript" src="<?php echo URL::getLink('script/upload/bootstrap.min.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/upload/jquery.iframe-transport.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/upload/jquery.fileupload.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/bjqs-1.3.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/carousel/modernizr.custom.17475.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo URL::getLink('script/carousel/jquery.elastislide.js'); ?>"></script>
    </head>

    <body onunload="closeBrowser()">
        <div id="admin_header">
            <?php include('layout/adminCP/adminHeader.php');?>
        </div>
        <div id="swap">
            <div id="right_content">
                <?php core::getContent();?>
            </div>

            <div style="clear: both;"></div>
        </div>
        <?php include('layout/loginForm.php'); ?>
        <?php include('layout/registerForm.php'); ?> 
        <?php include('layout/popup_template.php');?>

        <?php   
            if(database::isUser())
            {
                includeBlock('chat/messageBlock');
                includeBlock('chat/poupnotification');
            }
        ?>
        <?php
            $time = microtime();
            $time = explode(' ', $time);
            $time = $time[1] + $time[0];
            $finish = $time;
            $total_time = round(($finish - $start), 4);
        ?>
        <div id="footer" style="position:relative;">
            <div style="text-align: center;color: #FFF;font-size:13px;position:absolute;bottom:10px;right:10px;">Number SPARQL Query <?php echo database::$iCountQuerySPARQL; ?>, Number Normal Query <?php echo database::$iCountNormalQuery; ?>, Time respond <?php echo $total_time; ?></div>
            <?php include('layout/footer.php');?>
        </div>
    </body>
</html>